/**
 * Created by jimmy on 2017/6/17.
 */

var prodService = require("../service/ProdService");
var async = require("async");

exports.index = function (req,res,next) {
    var prodTypes = null;
    async.series({
        pdList:function (callbk) {
            prodService.getMainProd(callbk);
            // callbk(null,null);
        }
    },function (err,result) {
        console.log(result.pdList);
        if(err){
            console.log(err)
        }else {
            console.log(JSON.stringify(result.prodList));
            res.render("index",{title:"首页",home:"on",prod:"",prebuy:"",my:"",pdList:result.pdList});
        }
    });

}